package cc.cc4414.cc02.core.result;

/**
 * 自定义业务异常
 * 
 * @author cc 2018年4月29日
 */
public class ResultException extends RuntimeException {
	private static final long serialVersionUID = 479954462183694197L;

	/** 错误码. */
	private String code;

	public ResultException(String code, String message) {
		super(message);
		this.code = code;
	}

	public ResultException(ResultEnum resultEnum) {
		this(resultEnum.getCode(), resultEnum.getMessage());
	}

	public String getCode() {
		return code;
	}
}
